feat: add optional static IP support for devices without DHCP#1566
Open
IMINABO1 wants to merge 10 commits into
Open
feat: add optional static IP support for devices without DHCP#1566IMINABO1 wants to merge 10 commits into
IMINABO1 wants to merge 10 commits into
Conversation
Surface which tester(s) hang and for how long when the wait loop expires silently, so the next failing CI run pinpoints the regression.
- actions/checkout v4.1.1 -> v6.0.2 - actions/setup-node v4.0.1 -> v6.4.0 - actions/upload-artifact v4.2.0 / v3.pre.node20 -> v4.6.2 - actions/download-artifact v4.1.8 -> v4.3.0 Silences the 8 Node-20 deprecation warnings ahead of the Sept 2026 runner removal.
Orphaned when TestNetworkEvent class was removed alongside the ARP-IP-detection revert.
Drops the 200-line testrun-log dump that was added during the ARP-IP-detection bug hunt. Keeps the per-tester elapsed log and the ::error:: annotation as ongoing CI signal for any future regression. Also drops the 'DIAGNOSTIC:' prefix \u2014 reads cleaner as production CI output.
The previous Node-24 bump left upload-artifact pinned at v4.6.2 and download-artifact at v4.3.0 — both still run on Node.js 20 and trigger GitHub's deprecation warnings on every Actions run. Move upload-artifact to v7.0.1 and download-artifact to v8.0.1, both on node24. Current call sites only use name/path/if-no-files-found, none of which are affected by the v5→v8 breaking changes
The ntp_compliant tester passed or failed depending on a timing lottery: the device sent a single burst of NTP queries right after its first DHCP bind, which can fall in the capture gap between startup.pcap (stops once the device gets an IP) and monitor.pcap (starts ~10s later). The ntp.pcap safety net from the NTP network container is itself subject to a container-restart race, and the entrypoint's later NTP attempts never worked: dhclient -sf is blocked by AppArmor on CI runners and the lease fallback called sudo, which is not installed in the image. Drop the broken dhclient hook, query the DHCP-provided server directly from the lease file (without sudo, with the trailing semicolon stripped), and keep sending NTP requests in a background loop - mirroring the existing arping loop - so requests are always captured during the monitor period.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Author
|
I have signed the CLA. |
Bump action pins to match upstream (checkout v6.0.2 -> v6.0.3, scorecard-action v2.3.1 -> v2.4.3), update package versions in requirements.txt, and sync .gitignore and testing.yml triggers with upstream main. Re-apply static IP additions (import ipaddress, DEVICE_IP_ADDR_KEY, ip_addr loading) on top of upstream's updated testrun.py.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1450
Some devices (e.g. industrial/elevator controllers) don't support DHCP and currently cause Testrun to cancel the run when no IP is obtained.
This PR adds optional static IP support: if a device's
device_config.jsonincludes an"ip_addr"field, the network orchestrator skips the DHCP wait and uses that IP directly. Devices withoutip_addrare completely unaffected, existing behaviour is unchanged.Changes:
device_config.jsonaccepts an optional"ip_addr"(validated as IPv4)_dhcp_lease_ackno longer overwrites a pre-configured static IPtesting/unit/framework/static_ip_test.py)